package study.config.apollo.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import study.config.apollo.support.bean.Bean1;
import study.config.apollo.support.bean.Bean2;

@Slf4j
@RestController
@RequestMapping("/prop")
public class PropController {


    @Autowired
    private Bean1 propBeanV1;
    @Autowired
    private Bean2 propBeanV2;

    @RequestMapping("/v1")
    public String v1() {
        log.info(">>>>>> prop1= {}", propBeanV1);
        return "ok";
    }

    @RequestMapping("/v2")
    public String v2() {
        log.info(">>>>>> prop2= {}", propBeanV2);
        return "ok";
    }
}
